package com.huatech.cloud.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.huatech.cloud.config.EncryptorTools;

@RestController
public class EncryptorController {
	
	@GetMapping("/")
	public Object index() {
		return "hello";
	}
	
	@GetMapping("/api/common/encrypt")
	public Object encrypt(@RequestParam String password, 
			@RequestParam String plainText) {
		 return EncryptorTools.encrypt(password, plainText);
	}

}
